package com.cd.music.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * @author yxl 余秀良
 * @version 1.0
 * @description: 角色表实体类
 * @date 2018年02月27日  上午11:36
 * @address: 四川成都
 */
@Entity
@Table(name = "Role")
public class Role implements Serializable {
    private static final long serialVersionUID = 3914630404745865689L;
    /**
     * 角色id
     */
    @Id
    @Column(nullable = false, length = 32, unique = true, name = "id")
    private String id;
    /**
     * 角色名称
     */
    @Column(name = "name", length = 30, nullable = false, unique = true)
    private String name;
    /**
     * 身份类型  0 :超级管理员 1:管理员 2:普通用户
     */
    @Column(name = "sign", columnDefinition = "tinyint(1) default 2")
    private int sign;
    /**
     * 创建者姓名
     */
    @Column(length = 30)
    private String createUserName;
    /**
     * 创建时间
     */
    @Column(name = "createTime", columnDefinition = "datetime default now()")
    private Date createTime;
    /**
     * 备注
     */
    @Column(name = "remark", length = 200)
    private String remark;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getSign() {
        return sign;
    }

    public void setSign(int sign) {
        this.sign = sign;
    }

    public String getCreateUserName() {
        return createUserName;
    }

    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }

    public Date getCreateTime() {
        return (Date) createTime.clone();
    }

    public void setCreateTime(Date createTime) {
        this.createTime = (Date) createTime.clone();
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
